package com.xbongbong.parent.pojo.list;

import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.domain.entity.ext.PaasFormEntityExt;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author 吴峰
 * @date 2021/12/16 20:15
 */
@Getter
@Setter
@ToString
public class DataAnalysisListPojo implements Serializable {
    private static final long serialVersionUID = -5569778554947674760L;


    private String corpid;

    private String userId;

    private Long formId;

    private UserVO userVO;
    /**
     * 经销商标记
     * @see com.xbongbong.pro.enums.DistributorMarkEnum
     */
    private Integer distributorMark;

    private Integer saasMark;

    private Integer businessType;

    private Integer subBusinessType;

    private Integer page;

    private Integer pageSize;
    /**
     * 字段解释
     */
    private List<FieldAttrEntity> explainList;

    private List<PaasFormDataEntityExt> formDataList;

    /**
     * 手机端 formId和explain（过滤后的）的map，目前仅用于工单全部列表，用于渲染摘要，标签，标题，与上面一个参数必须一起传
     */
    private Map<Long, List<FieldAttrEntity>> formIdAndHeadListMap;

    private PaasFormEntityExt form;

    /**
     * 金额字段千分位解析是否需要保留原值
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Boolean analysisAmountOfThousandBitsWithOriginalValue;


    public DataAnalysisListPojo() {
    }

    public DataAnalysisListPojo(String corpid, String userId, UserVO userVO, Long formId, Integer distributorMark, Integer saasMark, Integer businessType, Integer subBusinessType, Integer page, Integer pageSize, List<FieldAttrEntity> explainList, PaasFormEntityExt form, List<PaasFormDataEntityExt> formDataList, Boolean analysisAmountOfThousandBitsWithOriginalValue) {
        this.corpid = corpid;
        this.userId = userId;
        this.userVO = userVO;
        this.formId = formId;
        this.distributorMark = distributorMark;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.subBusinessType = subBusinessType;
        this.page = page;
        this.pageSize = pageSize;
        this.explainList = explainList;
        this.form = form;
        this.formDataList = formDataList;
        this.analysisAmountOfThousandBitsWithOriginalValue = analysisAmountOfThousandBitsWithOriginalValue;
    }

    public DataAnalysisListPojo(String corpid, String userId, UserVO userVO, Long formId, Integer distributorMark, Integer saasMark, Integer businessType, Integer subBusinessType, Integer page, Integer pageSize, List<FieldAttrEntity> explainList, List<PaasFormDataEntityExt> formDataList, PaasFormEntityExt form, Map<Long, List<FieldAttrEntity>> formIdAndHeadListMap) {
        this.corpid = corpid;
        this.userId = userId;
        this.userVO = userVO;
        this.formId = formId;
        this.distributorMark = distributorMark;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.subBusinessType = subBusinessType;
        this.page = page;
        this.pageSize = pageSize;
        this.explainList = explainList;
        this.formDataList = formDataList;
        this.form = form;
        this.formIdAndHeadListMap = formIdAndHeadListMap;
    }
}
